package com.example.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface CommentMapper {
    public int createComment(@Param("uid") int uid, @Param("pid") int pid, @Param("traceNo") String traceNo, @Param("totalPrice") int totalPrice);

    //发表评论
    public int addComment(@Param("uid") int uid, @Param("pid") int pid, @Param("traceNo") String traceNo, @Param("content") String content, @Param("rating") int rating);

    List<Object> getCommentByPid(@Param("pid")int pid);

    List<Object> getCommentByRating(@Param("minRating") int minRating, @Param("maxRating") int maxRating, @Param("pid") int pid);
}
